package com.xty.itgroup.tech05tytex.Mapper.Impl;

import com.xty.itgroup.tech05tytex.Databean.Bean03AxisDetail;
import com.xty.itgroup.tech05tytex.Databean.Bean03AxisMain;
import com.xty.itgroup.tech05tytex.Databean.Bean03Company;
import com.xty.itgroup.tech05tytex.Mapper.Mapper03Axis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Copyright ? 2020年 tech05tytex. All rights reserved.
 *
 * @author JinHaoNan
 * TODO: 为了共建和谐社会，请为该类写点注释吧...
 * version 1.0.0
 * @date 2020/10/10 15:23
 */
@Service
public class Impl03Axis implements Mapper03Axis{
    @Autowired
    private Mapper03Axis axis;

    @Override
    public void addAxisMain(Bean03AxisMain axiss) {
        axis.addAxisMain(axiss);
    }

    @Override
    public void addAxisDetail(List<Bean03AxisDetail> axiss, String type, int axismainid) {
        axis.addAxisDetail(axiss, type, axismainid);
    }

    @Override
    public List<Map<String, Object>> listAxisCards(String orderid, String weavename, int companyid) {
        return axis.listAxisCards(orderid==null?"%%":"%"+orderid+"%", weavename==null?"%%":"%"+weavename+"%", companyid);
    }

    @Override
    public Map<String, Object> getMainById(int mainid) {
        return axis.getMainById(mainid);
    }

    @Override
    public List<Map<String, Object>> getDetailByAxisId(int axismainid) {
        return axis.getDetailByAxisId(axismainid);
    }

    @Override
    public void updateAxisMain(Bean03AxisMain bam) {
        axis.updateAxisMain(bam);
    }

    @Override
    public void deleteAxisdetail(int mainid) {
        axis.deleteAxisdetail(mainid);
    }

    @Override
    public void deleteAxisMain(int mainid) {
        axis.deleteAxisMain(mainid);
    }

    @Override
    public List<Map<String, Object>> getAxisLines(String weave_name) {
        return axis.getAxisLines(weave_name);
    }

    @Override
    public List<Bean03Company> listCompany(String company_name) {
        return axis.listCompany(company_name==null?"%%":"%"+company_name+"%");
    }
}
